package com.neuedu.grainsapi.controller;

import com.neuedu.grainsapi.pojo.MapProvince;
import com.neuedu.grainsapi.service.MapProvinceService;
import com.neuedu.grainsapi.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class MapProvinceController {
    @Autowired
    private MapProvinceService mapProvinceService;
    @GetMapping("/queryMap")
    public ResponseResult<List<MapProvince>> queryMap(){
        List<MapProvince> mapProvinces = mapProvinceService.queryMap();
        return new ResponseResult<>("200","yes",mapProvinces);
    }
}
